package com.feitian.plugin.service;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.repository.Deployment;
import org.junit.Test;

import com.feitian.plugin.config.ProcessEngineConfig;

/**
 *@author MACHENIKE
 *@date   2018年11月6日
 *@feature
 *@desc 
 *
 */
public class ActivitiTest {
	ProcessEngine processEngine = ProcessEngineConfig.getProcessEngineDefault();
	
	/**
	 * 通过资源部署流程
	 * 
	 *@author MACHENIKE
	 *@date 2018年11月6日
	 *@feature
	 */
	
	@Test
	public void deployProcess() {
	  Deployment deployment=processEngine.getRepositoryService()//
						.createDeployment()//
						.addClasspathResource("diapram/helloword.bpmn")//
						.addClasspathResource("diapram/helloword.png")
						.deploy();
	  System.out.println();
	  System.out.println();
	}
}
